/**
 * @file mmath.h
 * @author your name (you@domain.com)
 * @brief
 * @version 0.1
 * @date 2025-05-06
 *
 * @copyright Copyright (c) 2025
 *
 */
#ifndef __MMATH_H__
#define __MMATH_H__
#include <xmzTypeDefine.h>
// 加法函数声明
Bool AddSInt(Bool  EN,
             SInt* out,
             SInt  in1,
             SInt  in2,
             SInt  in3,
             SInt  in4,
             SInt  in5,
             SInt  in6,
             SInt  in7,
             SInt  in8,
             SInt  in9,
             SInt  in10);
Bool AddUSInt(Bool   EN,
              USInt* out,
              USInt  in1,
              USInt  in2,
              USInt  in3,
              USInt  in4,
              USInt  in5,
              USInt  in6,
              USInt  in7,
              USInt  in8,
              USInt  in9,
              USInt  in10);
Bool AddInt(
        Bool EN, Int* out, Int in1, Int in2, Int in3, Int in4, Int in5, Int in6, Int in7, Int in8, Int in9, Int in10);
Bool AddUInt(Bool  EN,
             UInt* out,
             UInt  in1,
             UInt  in2,
             UInt  in3,
             UInt  in4,
             UInt  in5,
             UInt  in6,
             UInt  in7,
             UInt  in8,
             UInt  in9,
             UInt  in10);
Bool AddDInt(Bool  EN,
             DInt* out,
             DInt  in1,
             DInt  in2,
             DInt  in3,
             DInt  in4,
             DInt  in5,
             DInt  in6,
             DInt  in7,
             DInt  in8,
             DInt  in9,
             DInt  in10);
Bool AddUDInt(Bool   EN,
              UDInt* out,
              UDInt  in1,
              UDInt  in2,
              UDInt  in3,
              UDInt  in4,
              UDInt  in5,
              UDInt  in6,
              UDInt  in7,
              UDInt  in8,
              UDInt  in9,
              UDInt  in10);
Bool AddReal(Bool  EN,
             Real* out,
             Real  in1,
             Real  in2,
             Real  in3,
             Real  in4,
             Real  in5,
             Real  in6,
             Real  in7,
             Real  in8,
             Real  in9,
             Real  in10);
Bool AddLReal(Bool   EN,
              LReal* out,
              LReal  in1,
              LReal  in2,
              LReal  in3,
              LReal  in4,
              LReal  in5,
              LReal  in6,
              LReal  in7,
              LReal  in8,
              LReal  in9,
              LReal  in10);

// 乘法函数声明
Bool MulSInt(Bool  EN,
             SInt* out,
             SInt  in1,
             SInt  in2,
             SInt  in3,
             SInt  in4,
             SInt  in5,
             SInt  in6,
             SInt  in7,
             SInt  in8,
             SInt  in9,
             SInt  in10);
Bool MulUSInt(Bool   EN,
              USInt* out,
              USInt  in1,
              USInt  in2,
              USInt  in3,
              USInt  in4,
              USInt  in5,
              USInt  in6,
              USInt  in7,
              USInt  in8,
              USInt  in9,
              USInt  in10);
Bool MulInt(
        Bool EN, Int* out, Int in1, Int in2, Int in3, Int in4, Int in5, Int in6, Int in7, Int in8, Int in9, Int in10);
Bool MulUInt(Bool  EN,
             UInt* out,
             UInt  in1,
             UInt  in2,
             UInt  in3,
             UInt  in4,
             UInt  in5,
             UInt  in6,
             UInt  in7,
             UInt  in8,
             UInt  in9,
             UInt  in10);
Bool MulDInt(Bool  EN,
             DInt* out,
             DInt  in1,
             DInt  in2,
             DInt  in3,
             DInt  in4,
             DInt  in5,
             DInt  in6,
             DInt  in7,
             DInt  in8,
             DInt  in9,
             DInt  in10);
Bool MulUDInt(Bool   EN,
              UDInt* out,
              UDInt  in1,
              UDInt  in2,
              UDInt  in3,
              UDInt  in4,
              UDInt  in5,
              UDInt  in6,
              UDInt  in7,
              UDInt  in8,
              UDInt  in9,
              UDInt  in10);
Bool MulReal(Bool  EN,
             Real* out,
             Real  in1,
             Real  in2,
             Real  in3,
             Real  in4,
             Real  in5,
             Real  in6,
             Real  in7,
             Real  in8,
             Real  in9,
             Real  in10);
Bool MulLReal(Bool   EN,
              LReal* out,
              LReal  in1,
              LReal  in2,
              LReal  in3,
              LReal  in4,
              LReal  in5,
              LReal  in6,
              LReal  in7,
              LReal  in8,
              LReal  in9,
              LReal  in10);

// 减法函数声明
Bool SubSInt(Bool EN, SInt* out, SInt in1, SInt in2);
Bool SubUSInt(Bool EN, USInt* out, USInt in1, USInt in2);
Bool SubInt(Bool EN, Int* out, Int in1, Int in2);
Bool SubUInt(Bool EN, UInt* out, UInt in1, UInt in2);
Bool SubDInt(Bool EN, DInt* out, DInt in1, DInt in2);
Bool SubUDInt(Bool EN, UDInt* out, UDInt in1, UDInt in2);
Bool SubReal(Bool EN, Real* out, Real in1, Real in2);
Bool SubLReal(Bool EN, LReal* out, LReal in1, LReal in2);

// 除法函数声明
Bool DivSInt(Bool EN, SInt* out, SInt in1, SInt in2);
Bool DivUSInt(Bool EN, USInt* out, USInt in1, USInt in2);
Bool DivInt(Bool EN, Int* out, Int in1, Int in2);
Bool DivUInt(Bool EN, UInt* out, UInt in1, UInt in2);
Bool DivDInt(Bool EN, DInt* out, DInt in1, DInt in2);
Bool DivUDInt(Bool EN, UDInt* out, UDInt in1, UDInt in2);
Bool DivReal(Bool EN, Real* out, Real in1, Real in2);
Bool DivLReal(Bool EN, LReal* out, LReal in1, LReal in2);

// 取余函数声明
Bool ModSInt(Bool EN, SInt* out, SInt in1, SInt in2);
Bool ModUSInt(Bool EN, USInt* out, USInt in1, USInt in2);
Bool ModInt(Bool EN, Int* out, Int in1, Int in2);
Bool ModUInt(Bool EN, UInt* out, UInt in1, UInt in2);
Bool ModDInt(Bool EN, DInt* out, DInt in1, DInt in2);
Bool ModUDInt(Bool EN, UDInt* out, UDInt in1, UDInt in2);

// 递增函数声明
uint8_t IncSInt(uint8_t EN, SInt* operand);
uint8_t IncUSInt(uint8_t EN, USInt* operand);
uint8_t IncInt(uint8_t EN, Int* operand);
uint8_t IncUInt(uint8_t EN, UInt* operand);
uint8_t IncDInt(uint8_t EN, DInt* operand);
uint8_t IncUDInt(uint8_t EN, UDInt* operand);

// 递减函数声明
uint8_t DecSInt(uint8_t EN, SInt* operand);
uint8_t DecUSInt(uint8_t EN, USInt* operand);
uint8_t DecInt(uint8_t EN, Int* operand);
uint8_t DecUInt(uint8_t EN, UInt* operand);
uint8_t DecDInt(uint8_t EN, DInt* operand);
uint8_t DecUDInt(uint8_t EN, UDInt* operand);
#endif
